package cn.drenal.capcap.entity;

import cn.drenal.capcap.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.tangzc.autotable.annotation.ColumnComment;
import com.tangzc.autotable.annotation.ColumnDefault;
import com.tangzc.autotable.annotation.ColumnNotNull;
import com.tangzc.mpe.autotable.annotation.*;
import com.tangzc.mpe.processer.annotation.AutoDefine;
import com.tangzc.mpe.processer.annotation.AutoMapper;
import com.tangzc.mpe.processer.annotation.AutoRepository;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 系统配置表
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper
@Table(comment = "系统配置表")
public class SysConfig extends BaseEntity {
    @ColumnComment("主键")
    @ColumnId(mode = IdType.AUTO)
    private Long id;

    @ColumnComment("配置键")
    @ColumnNotNull
    @UniqueIndex
    private String configKey;

    @ColumnComment("配置值")
    @ColumnNotNull
    private String configValue;

    @ColumnComment("配置描述")
    private String description;

    @ColumnComment("配置分组")
    @ColumnNotNull
    @ColumnDefault("system")
    private String groupName;

    @ColumnComment("是否系统内置：0-否，1-是")
    @ColumnNotNull
    @ColumnDefault("0")
    private Integer isSystem;

    @ColumnComment("状态：0-禁用，1-启用")
    @ColumnNotNull
    @ColumnDefault("1")
    private Integer status;
}